1. Field of the Invention
The present invention relates to a communication system, a communication control method, and a program for implementing the method, and relates to, for example, a communication system including a master apparatus and a slave apparatus, where the master apparatus controls communication of the slave apparatus, a communication control method applied to the communication system, and a program causing a computer to execute the communication control method.
2. Description of the Related Art
In a conventional communication system where a master apparatus controls communication of a slave apparatus, and data transmission and data reception are carried out simultaneously, the slave apparatus notifies the master apparatus of a result of determination of an error in Nth reception data by returning N+1th reception data with the determination result added thereto to the master apparatus. For example, according to Japanese Laid-Open Patent Publication (Kokai) No. H07-276743, if an error occurs in data transmitted from a master apparatus, a slave apparatus transmits an error status at the time of transmission of the next command (next data transmission).
It should be noted that the error determination method carried out by the slave apparatus includes a method which determines that reception data is normal if the sum of the reception data and a checksum in the reception data coincide with each other, and a method which determines that reception data is normal if parity data added to the reception data has a predetermined value.
However, in the conventional communication system where the data transmission and data reception are carried out simultaneously, since the slave apparatus requests the master apparatus for re-transmission of data by returning N+1th reception data with the determination result added thereto to the master apparatus, the Nth reception data is re-transmitted to the slave apparatus when N+2th reception data is transmitted.
As a result, if there is an error in the reception data, there is a delay before correct data is re-transmitted, and this delay slows down the communication processing speed.
Further, for a conventional system where one apparatus controls another apparatus, there has been proposed a method in which communication control is carried out between these apparatuses, and these apparatuses control each other via the communication (for example, Japanese Laid-Open Patent Publications (Kokai) No. H02-37438, No. H11-143842, and No. 2000-244689). In such a system, if a master-slave type method in which one apparatus acts as a master apparatus, and the other apparatus acts as a slave apparatus, it is possible to provide a system where the one apparatus controls the other apparatus with a relatively inexpensive and simple construction.
However, in the conventional master-slave type communication system, if an error occurs in a data reception control section of the slave apparatus, the slave apparatus can run away while the slave apparatus is out of control of the master apparatus.
Further, when such an error occurs, the master apparatus cannot restore the slave apparatus into a normal operative state, and to cope with this, it is necessary that at least the power of the slave apparatus is turned off, and then turned on to restart the slave apparatus.
Another way to cope with this problem involves providing a signal line (reset control line) between the master apparatus and the slave apparatus for resetting the slave apparatus from the master apparatus. However, this way of providing a reset control line between the apparatuses leads to increased costs.